import request from '@/utils/request'

// 查询分段订单列表
export function listLed(query) {
  return request({
    url: '/order/led/list',
    method: 'get',
    params: query
  })
}

export function listQsLed(query) {
  return request({
    url: '/order/led/listOrderQS',
    method: 'get',
    params: query
  })
}

export function listInventory(query) {
  return request({
    url: '/order/led/inventoryList',
    method: 'get',
    params: query
  })
}

// 查询分段订单详细
export function getDZLedList(shipmentId) {
  return request({
    url: '/order/led/getDZLedList/' + shipmentId,
    method: 'get'
  })
}
// 查询分段订单详细
export function getLed(id) {
  return request({
    url: '/order/led/' + id,
    method: 'get'
  })
}

// 修改分段订单
export function updateLed(data) {
  return request({
    url: '/order/led',
    method: 'put',
    data: data
  })
}

// 修改分段订单
export function setSelfPickSign(data) {
  return request({
    url: '/order/led/setSelfPickSign',
    method: 'post',
    data: data
  })
}

// 修改分段订单
export function signReceivingLed(data) {
  return request({
    url: '/order/led/signReceiving',
    method: 'put',
    data: data
  })
}

// 修改件重尺(主要针对拆分的单子)
export function saveLedSize(data) {
  return request({
    url: '/order/led/saveLedSize',
    method: 'post',
    data: data
  })
}


// 加载以被运单配载的表格
export function listLedLoad(shipmentId) {
  return request({
    url: '/order/led/getStowage/' + shipmentId,
    method: 'get'
  })
}

// 加载以被运单配载的表格
export function addressInfo(shipmentId) {
  return request({
    url: '/order/led/getAddressInfo/' + shipmentId,
    method: 'get'
  })
}
